package by.semerikov.converter.tostring;

import java.util.Map;

import by.semerikov.statictic.StaticticByPartDay;

public class StatisticByPartDayToStringFormater {
	
	public String convert(Map<String,Integer> map) {
		StringBuilder result = new StringBuilder();
		for (Integer i = 0; i < StaticticByPartDay.parts.length; i++) {
				result.append(StaticticByPartDay.parts[i]);
				result.append(" - ");
				if(map.get(StaticticByPartDay.parts[i])!= null)
					result.append(map.get(StaticticByPartDay.parts[i]).toString());
				else result.append("0");
				result.append("\n\r");
		}
		return result.toString();
	}
}
